﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;


    public interface IDataRemoteHelper
    {
        // Methods
        int Begin_Trans();
        bool Commit_Trans(int transID);
        string Config_Read(string sectionKey, bool sectionEncode);
        bool Config_Write(string sectionKey, string sectionValue, bool sectionEncode);
        bool Connection_Valid(string connectString);

        //--
        DataSet ExecuteDataset(int iTransID, CommandType commandType, string commandText);
        DataSet ExecuteDataset(int iTransID, string spName, params object[] parameterValues);
        DataSet ExecuteDataset(string connectString, CommandType commandType, string commandText);
        DataSet ExecuteDataset(string connectString, string spName, params object[] parameterValues);
        DataSet ExecuteDataset(int iTransID, CommandType commandType, string commandText, params object[] commandParameters);
        DataSet ExecuteDataset(string connectString, CommandType commandType, string commandText, params object[] commandParameters);

        //--
        int ExecuteNonQuery(int iTransID, CommandType commandType, string commandText);
        int ExecuteNonQuery(int iTransID, string spName, object[][] parameterArray);
        int ExecuteNonQuery(int iTransID, string spName, params object[] parameterValues);
        int ExecuteNonQuery(string connectString, CommandType commandType, string commandText);
        int ExecuteNonQuery(string connectString, string spName, object[][] parameterArray);
        int ExecuteNonQuery(string connectString, string spName, params object[] parameterValues);
        int ExecuteNonQuery(int iTransID, CommandType commandType, string commandText, params object[] commandParameters);
        int ExecuteNonQuery(string connectString, CommandType commandType, string commandText, params object[] commandParameters);

        //--
        DataRow ExecuteRow(int iTransID, CommandType commandType, string commandText);
        DataRow ExecuteRow(int iTransID, string spName, params object[] parameterValues);
        DataRow ExecuteRow(string connectString, CommandType commandType, string commandText);
        DataRow ExecuteRow(string connectString, string spName, params object[] parameterValues);
        DataRow ExecuteRow(int iTransID, CommandType commandType, string commandText, params object[] commandParameters);
        DataRow ExecuteRow(string connectString, CommandType commandType, string commandText, params object[] commandParameters);

        //--
        object ExecuteScalar(int iTransID, CommandType commandType, string commandText);
        object ExecuteScalar(int iTransID, string spName, params object[] parameterValues);
        object ExecuteScalar(int iTransID, string spName, object[][] parameterArray);
        object ExecuteScalar(string connectString, CommandType commandType, string commandText);
        object ExecuteScalar(string connectString, string spName, object[][] parameterArray);
        object ExecuteScalar(string connectString, string spName, params object[] parameterValues);
        object ExecuteScalar(int iTransID, CommandType commandType, string commandText, params object[] commandParameters);
        object ExecuteScalar(string connectString, CommandType commandType, string commandText, params object[] commandParameters);

        //-
        DataTable ExecuteTable(int iTransID, CommandType commandType, string commandText);
        DataTable ExecuteTable(int iTransID, string spName, params object[] parameterValues);
        DataTable ExecuteTable(string connectString, CommandType commandType, string commandText);
        DataTable ExecuteTable(string connectString, string spName, params object[] parameterValues);
        DataTable ExecuteTable(int iTransID, CommandType commandType, string commandText, params object[] commandParameters);
        DataTable ExecuteTable(string connectString, CommandType commandType, string commandText, params object[] commandParameters);
        bool Rollback_Trans(int transID);

        // Properties
        string ConnectString { get; set; }

        DataRowEx ExecuteRowEx(int iTransID, string spName, object[] parameterValues);
        DataRowEx ExecuteRowEx(string connectString, CommandType commandType, string commandText);

        DataRowEx ExecuteRowEx(int iTransID, CommandType commandType, string commandText, object[] commandParameters);

        DataRowEx ExecuteRowEx(string connectString, CommandType commandType, string commandText, object[] commandParameters);

        DataRowEx ExecuteRowEx(string connectString, string spName, object[] parameterValues);

        DataRowEx ExecuteRowEx(int iTransID, CommandType commandType, string commandText);
    }
